  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  <script type="text/javascript" src="http://www.parsecdn.com/js/parse-1.2.12.min.js"></script>

<script>
	  //SCRIPT TO CHECK IF SIGNED IN OR NOT
//	window.onload = function () {
		Parse.initialize("EL9rGBARwKQl3NL4HAQ2U4GxQYjXV8dDDvDDaTPe", "WQLflsIP1zoVHCZgNjpr95dtrmaqjCaCkWSbOSrU");

    var currentUser = Parse.User.current();
 
    if (currentUser) {
	//get the gender
	var gender=currentUser.get("gender");
	var role = currentUser.get("class");
	var image;
	if (gender == "male")
	{
		image = "<img height=\"13\" width=\"13\" src=\"assets/images/m"+role+".png\"";
	}
	else if (gender == "female")
	{
		image = "<img height=\"13\" width=\"13\" src=\"assets/images/m"+role+".png\"";
	}
	document.getElementById("user").innerHTML="<a href=\"user.html\">"+ currentUser.get("username")+" &nbsp;"+image+"</a>";
    } else {
		document.getElementById("user").innerHTML="<a href=\"login.html\"> Login </a>";
		document.getElementById("user2").innerHTML="";
    }
 
//}
	
	
	var logout = function()
	{
	Parse.User.logOut();
	//move to 
	}
</script>

<ul>
	<li><a href="index.html">Home</a></li>
	<li><a href="game.html">Game</a></li>
	<li><a href="highScores.html">High Scores</a></li>
	<li><a href="user.html">My Scores</a></li>
	<li><a href="guide.html">Guide</a></li>
	<li><a href="about.html">About</a></li>
	<li id="user2"><a href="" onclick="logout()">Logout</a></li>
	<li id="user"><a href="user.html">Test </a></li>
</ul>
